package com.iris.live.services.data.models;

import javax.persistence.*;
import java.sql.Date;
import java.sql.Timestamp;

/**
 * Created by liuweilong on 2017/6/27.
 */
@Entity
@Table(name = "t_defeat_log", schema = "iris_dev", catalog = "")
public class TDefeatLogModel {
    private Integer id;
    private Integer custId;
    private Integer custIdState;
    private String permit;
    private String custName;
    private String custPhone;
    private String custSex;
    private String interestRank;
    private String userName;
    private Integer defeatType;
    private Timestamp defeatTime;
    private String source;
    private String guardBank;
    private Integer interestCar;
    private Date forFilingDate;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "cust_id")
    public Integer getCustId() {
        return custId;
    }

    public void setCustId(Integer custId) {
        this.custId = custId;
    }

    @Basic
    @Column(name = "cust_id_state")
    public Integer getCustIdState() {
        return custIdState;
    }

    public void setCustIdState(Integer custIdState) {
        this.custIdState = custIdState;
    }

    @Basic
    @Column(name = "permit")
    public String getPermit() {
        return permit;
    }

    public void setPermit(String permit) {
        this.permit = permit;
    }

    @Basic
    @Column(name = "cust_name")
    public String getCustName() {
        return custName;
    }

    public void setCustName(String custName) {
        this.custName = custName;
    }

    @Basic
    @Column(name = "cust_phone")
    public String getCustPhone() {
        return custPhone;
    }

    public void setCustPhone(String custPhone) {
        this.custPhone = custPhone;
    }

    @Basic
    @Column(name = "cust_sex")
    public String getCustSex() {
        return custSex;
    }

    public void setCustSex(String custSex) {
        this.custSex = custSex;
    }

    @Basic
    @Column(name = "interest_rank")
    public String getInterestRank() {
        return interestRank;
    }

    public void setInterestRank(String interestRank) {
        this.interestRank = interestRank;
    }

    @Basic
    @Column(name = "user_name")
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Basic
    @Column(name = "defeat_type")
    public Integer getDefeatType() {
        return defeatType;
    }

    public void setDefeatType(Integer defeatType) {
        this.defeatType = defeatType;
    }

    @Basic
    @Column(name = "defeat_time")
    public Timestamp getDefeatTime() {
        return defeatTime;
    }

    public void setDefeatTime(Timestamp defeatTime) {
        this.defeatTime = defeatTime;
    }

    @Basic
    @Column(name = "source")
    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    @Basic
    @Column(name = "guard_bank")
    public String getGuardBank() {
        return guardBank;
    }

    public void setGuardBank(String guardBank) {
        this.guardBank = guardBank;
    }

    @Basic
    @Column(name = "interest_car")
    public Integer getInterestCar() {
        return interestCar;
    }

    public void setInterestCar(Integer interestCar) {
        this.interestCar = interestCar;
    }

    @Basic
    @Column(name = "for_filing_date")
    public Date getForFilingDate() {
        return forFilingDate;
    }

    public void setForFilingDate(Date forFilingDate) {
        this.forFilingDate = forFilingDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TDefeatLogModel that = (TDefeatLogModel) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (custId != null ? !custId.equals(that.custId) : that.custId != null) return false;
        if (custIdState != null ? !custIdState.equals(that.custIdState) : that.custIdState != null) return false;
        if (permit != null ? !permit.equals(that.permit) : that.permit != null) return false;
        if (custName != null ? !custName.equals(that.custName) : that.custName != null) return false;
        if (custPhone != null ? !custPhone.equals(that.custPhone) : that.custPhone != null) return false;
        if (custSex != null ? !custSex.equals(that.custSex) : that.custSex != null) return false;
        if (interestRank != null ? !interestRank.equals(that.interestRank) : that.interestRank != null) return false;
        if (userName != null ? !userName.equals(that.userName) : that.userName != null) return false;
        if (defeatType != null ? !defeatType.equals(that.defeatType) : that.defeatType != null) return false;
        if (defeatTime != null ? !defeatTime.equals(that.defeatTime) : that.defeatTime != null) return false;
        if (source != null ? !source.equals(that.source) : that.source != null) return false;
        if (guardBank != null ? !guardBank.equals(that.guardBank) : that.guardBank != null) return false;
        if (interestCar != null ? !interestCar.equals(that.interestCar) : that.interestCar != null) return false;
        if (forFilingDate != null ? !forFilingDate.equals(that.forFilingDate) : that.forFilingDate != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (custId != null ? custId.hashCode() : 0);
        result = 31 * result + (custIdState != null ? custIdState.hashCode() : 0);
        result = 31 * result + (permit != null ? permit.hashCode() : 0);
        result = 31 * result + (custName != null ? custName.hashCode() : 0);
        result = 31 * result + (custPhone != null ? custPhone.hashCode() : 0);
        result = 31 * result + (custSex != null ? custSex.hashCode() : 0);
        result = 31 * result + (interestRank != null ? interestRank.hashCode() : 0);
        result = 31 * result + (userName != null ? userName.hashCode() : 0);
        result = 31 * result + (defeatType != null ? defeatType.hashCode() : 0);
        result = 31 * result + (defeatTime != null ? defeatTime.hashCode() : 0);
        result = 31 * result + (source != null ? source.hashCode() : 0);
        result = 31 * result + (guardBank != null ? guardBank.hashCode() : 0);
        result = 31 * result + (interestCar != null ? interestCar.hashCode() : 0);
        result = 31 * result + (forFilingDate != null ? forFilingDate.hashCode() : 0);
        return result;
    }
}
